Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get averaged congestion via the Scenario object #123

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Conversation

rouille
Copy link
Collaborator

@rouille rouille commented Mar 27, 2020

Purpose

Download/load the averaged congestion data frame.

What is the code doing

Download the averaged congestion pickle file from the server if not already on the local machine and return a data frame with the branch id as indices and the averaged CONGL and CONGU as columns.

Where to look

Two objects have been modified:

  • the get_averaged_cong method in the Analyze object has been implemented.
  • the list of possible output files that can be downloaded/loaded has been updated in the OutputData object.

Time estimate

Should be very quick

@danielolsen
Copy link
Contributor

Tested on Scenario 404, results from the getter function match what I see on the server.

>>> from powersimdata.scenario.scenario import Scenario
>>> scenario = Scenario('404')
SCENARIO: test | EasternBase_2020_two_day_test

--> State
analyze
>>> scenario.state.get_averaged_con()
--> Loading AVERAGED_CONG
404_AVERAGED_CONG.pkl not found in C:\Users\dolsen\ScenarioData\ on local machine
Transferring 404_AVERAGED_CONG.pkl from server
100%|#####################################| 2.12M/2.12M [00:00<00:00, 6.69Mb/s]
              CONGL  CONGU
0      0.000000e+00  0.0
1      0.000000e+00  0.0
2      0.000000e+00  0.0
3      0.000000e+00  0.0
4      0.000000e+00  0.0
...             ...  ...
88204  0.000000e+00  0.0
88205  0.000000e+00  0.0
88206  0.000000e+00  0.0
88207  7.437818e-12  0.0
88208  0.000000e+00  0.0

[88209 rows x 2 columns]

@rouille rouille force-pushed the get_averaged_cong branch from f32f818 to 90cefdb Compare March 27, 2020 16:37
@danielolsen danielolsen self-requested a review March 27, 2020 16:57
Copy link
Contributor

@danielolsen danielolsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@rouille rouille merged commit 19a7cb6 into develop Mar 27, 2020
@rouille rouille deleted the get_averaged_cong branch March 27, 2020 18:27
@ahurli ahurli mentioned this pull request Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants